<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>03-element对象二</title>


</head>
<body>
<ul id="myul">
    <li>aaaaaa</li>
    <li>bbbbbb</li>
    <li>cccccc</li>
</ul>

<script type="text/javascript">
    //获取到ul下面的所有子标签（子元素）
    //获取ul标签
    var ul = document.getElementById("myul");
    //获取ul下面的子标签
    //var lis = ul11.childNodes;
    //alert(lis.length);
    var lis = ul.getElementsByTagName("li");

/*====================================*/

    var byTagName = ul.getElementsByTagName("li");
    alert(lis.length);
    document.write(byTagName.length)
</script>

</body>
</html>